function loadImageNew(topic_id,flag)
{
	//图片新闻
	$.ajax({  
		type: "POST",  
        url: '../WebSubject/queryArticleByTop.json', 
        cache:false,  
	    data:{		    	    	  
	    	topic_id:topic_id,
        	flag :flag,
	    },  		    	     
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){		    	    		
	    		$.each(data,function(idx,obj){
	    			var maxwidth=25; 
	    			if(obj.title.length>maxwidth){
	    				obj.title=obj.title.substring(0,maxwidth);
	    				obj.title+=' ...';  
	    			}	    			
	    			var url='../WebSubject/detailMsgPage.htm?id='+obj.id +"&menu_id=" +obj.menu_id;	    			
	    			var addhtml = '<a href="'+url+'">' +
    						         '<img src="'+obj.img.split(',').shift()+'"  title="'+obj.title+'" />' +
    						      '</a>';
	                $("#picnews").append(addhtml);	    	                
	    		});
	    		
	    		$('#picnews').nivoSlider({
					 //effect: 'slideInRight',      
					 directionNav: false, //是否显示图片切换按钮(上/下页)
					 directionNavHide: true, //是否鼠标经过才显示
		        	 manualAdvance:true,	 
		             controlNav: true,               // 是否显示图片导航控制按钮（,2,3... ）  
		             controlNavThumbs: false,        // 是否使用图片的缩略图做为导航控制按钮
		             pauseOnHover: true            // 鼠标县浮时是否停止动画 
		        });			    	    		
	    	}	
	    },  
	     error : function(XMLHttpRequest, textStatus, errorThrown) {  
	       
	         XMLHttpRequest.status;
	         XMLHttpRequest.readyState;
	         textStatus;
	     }  
	});
	
}



//工作动态.

function loadGzdt(topic_id,flag)
{
	$.ajax({  
		type: "POST",  
        url: '../WebSubject/loadSubjectMsgByFlag.json',  
        async: false,
        data:{  
        	topic_id:topic_id,
        	flag :flag,
	    },  
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){
	    		var str="";
	    		for (var i=0;i<data.length;i++)
	    		{
	    			var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id+"&menu_id=" +data[i].menu_id;
	    			if(data[i].isLink == '1')
	    			{
	    				href=data[i].linkURL;
	    			}
	    			
	    		   str+="<li><span>"+(i+1)+"</span><p><a href='"+href+"' target='_blank' title='"+data[i].title+"'>"+subStr(data[i].title,20)+"</a></p></li>";
	    		}
	    		$("#gzdt_news_msg").append(str);
	    	}	
	    },  
	     error : function(XMLHttpRequest, textStatus, errorThrown) {  
	          alert("获取政策文件信息异常！");  
	          alert(XMLHttpRequest.status);
	          alert(XMLHttpRequest.readyState);
	          alert(textStatus);
	     }  
	});
}


//工作简报
function loadGzjb(topic_id,flag)
{
	$.ajax({  
		type: "POST",  
        url: '../WebSubject/loadSubjectMsgByFlag.json',  
        async: false,
        data:{  
        	topic_id:topic_id,
        	flag :flag,
	    },  
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){
	    		var str = "";
				for(var i = 0; i< data.length; i++)
				{
					var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id+"&menu_id=" +data[i].menu_id;
	    			if(data[i].isLink == '1')
	    			{
	    				href=data[i].linkURL;
	    			}
					
					var d = data[i].createTime;
					 var test = new Date(parseInt(d));  
					 var _year = test.getFullYear();  
					 var _month = parseInt(test.getMonth())+1;  
					 var _day = test.getDate();  
					str+= "<li>";
					str+="<div class='news_num'><p style='width:70px;'><span>"+_day+"</span>/<span> "+_month+"</span><br><span class='font_num'> "+_year+"</span></p></div>";
				    str+="<div class='news_text'><h2><a href='"+href+"' target='_blank' title='"+data[i].title+"'>"+data[i].title+"</a></h2>";
					 str+="<p>";
					str+=data[i].title;
					str+="<a href='"+href+"' class='detail' target='_blank'>[详情]</a>";
					str+="</p>";	
					str+="</div>";	
			        str+="</li>";
				}
				$("#gzjb_new_msg").append(str);
	    	}	
	    },  
	     error : function(XMLHttpRequest, textStatus, errorThrown) {  
	          alert("获取政策文件信息异常！");  
	          alert(XMLHttpRequest.status);
	          alert(XMLHttpRequest.readyState);
	          alert(textStatus);
	     }  
	});
}


//政策文件.
function loadzcwj(topic_id,flag)
{
	$.ajax({  
		type: "POST",  
        url: '../WebSubject/loadSubjectMsgByFlag.json',  
        async: false,
        data:{  
        	topic_id:topic_id,
        	flag :flag,
	    },  
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){
	    		zcwjPage(data);
	    	}	
	    },  
	     error : function(XMLHttpRequest, textStatus, errorThrown) {  
	          alert("获取政策文件信息异常！");  
	          alert(XMLHttpRequest.status);
	          alert(XMLHttpRequest.readyState);
	          alert(textStatus);
	     }  
	});
}



function zcwjPage(data)
{
	var str = "";
	for(var i = 0; i< data.length; i++)
	{
		var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id + "&menu_id=" +data[i].menu_id;
		if(data[i].isLink == '1')
		{
			href=data[i].linkURL;
		}
		
		var d = data[i].createTime;
		 var test = new Date(parseInt(d));  
		 var _year = test.getFullYear();  
		 var _month = parseInt(test.getMonth())+1;  
		 var _day = test.getDate();  
		
		str += "<div class='notice_con' style='margin-bottom:20px;'>";
		str += "    <div class='list_date'>";
		str += "        <ul>";
		str += "           <li class='list_month'>"+getEnMonth(_month)+"</li>";
		str += "           <li class='list_day'>"+_day+"</li>";
		str += "       </ul>";
		str += "    </div>";
		str += "    <div class='list_text'>";
		str += "        <h2><a href='"+href+"' target='_blank' title='"+data[i].title+"'>"+subStr(data[i].title, 15)+"</a></h2>";
		str += "			<p>";
	
		str += subStr(data[i].summary, 25)+"<a href='"+href+"' class='detail' target='' _blank'>[详情]</a>";
		str += "			</p>";
		str += "   </div>";
		str += " </div>";
	}
	
	$("#con_oneee_2").append(str);
}




//政策解读.

function loadzcjd(topic_id,flag)
{
	$.ajax({  
		type: "POST",  
        url: '../WebSubject/loadSubjectMsgByFlag.json',  
        async: false,
        data:{  
        	topic_id:topic_id,
        	flag :flag,
	    },   
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){
	    		zcjdPage(data);
	    	}	
	    },  
	     error : function(XMLHttpRequest, textStatus, errorThrown) {  
	          alert("获取政策解坊信息异常！");  
	          alert(XMLHttpRequest.status);
	          alert(XMLHttpRequest.readyState);
	          alert(textStatus);
	     }  
	});
}


function zcjdPage(data)
{
	var str = "";
	for(var i = 0; i< data.length; i++)
	{
		var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id+"&menu_id=" +data[i].menu_id;
		if(data[i].isLink == '1')
		{
			href=data[i].linkURL;
		}
		
		 var test = new Date(parseInt(data[i].createTime));  
		 var _year = test.getFullYear();  
		 var _month = parseInt(test.getMonth())+1;  
		 var _day = test.getDate(); 
		

		 str +="<li>";
		 str +="	<div class='news_num'><p><span>"+_day +"</span>/<span>"+ _month+"</span><br><span class='font_num'>"+_year +"</span></p></div>";
		 str +="    <div class='news_text'><h2><a href='"+href+"' target='_blank' title='"+data[i].title+"'>"+subStr(data[i].title,20)+" </a></h2>";
		 str +="			<p>";
		 str +=   subStr(data[i].summary,25);
		 str +="<a href='"+href+"' class='detail' target='_blank'>[详情]</a>";
		 str +="		</p>";
		 str +="	</div>";
		 str +="</li>";
		 
	}
	$("#zcjd_msg ").append(str);
}





/**
 * 加载通知公告
 */
function loadTzgg(topic_id,flag)
{
	$.ajax({  
		type: "POST",  
		url: '../WebSubject/loadSubjectMsgByFlag.json',  
        async: false,
        data:{  
        	topic_id:topic_id,
        	flag :flag,
	    },   
	    cache:false,  
	    dataType:'json',  
	    success:function(data) { 
	    	if(data!=null && data.length>0){
	    		tzggPage(data);
	    	}	
	    },  
	     error : function() {  
	          alert("获取通知通告信息异常！");  
	     }  
	});
}


function tzggPage(data){
	var str = "";
	for(var i = 0; i< data.length; i++)
	{
		var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id+"&menu_id=" +data[i].menu_id;
		if(data[i].isLink == '1')
		{
			href=data[i].linkURL;
		}
		
		
		 var test = new Date(parseInt(data[i].createTime));  
		 var _year = test.getFullYear();  
		 var _month = parseInt(test.getMonth())+1;  
		 var _day = test.getDate(); 
		
		str+="<div class='notice_con'>";
		str+="<div class='list_date'>";
		str+=        "<ul>";
		str+=            "<li class='list_month'>"+getEnMonth(_month)+"</li>";
		str+=            "<li class='list_day'>"+_day+"</li>";
		str+=        "</ul>";
		str+= "</div>";
		str+= "<div class='list_text'>";
		str+=    "<h2><a href='"+href+"' target='_blank' title='"+data[i].title+"'>"+subStr(data[i].title,15)+"</a></h2>";
		str+=         "<p>";
		str+=			subStr(data[i].summary,25)+"<a href='"+href+"' class='detail' target='_blank'>[详情]</a>";
		str+=		"</p>";
		str+=  "</div>";
		str+="</div> ";
	}
	$("#con_one_1 ").append(str);
}

